<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var name;
      (function () {
        if (typeof name === 'undefined') {
          // var name = 'aoliao';
          console.log('woqu');
        } else {
          console.log(name);
        }
      })();
      name = 'java';
      // var name = 'World!';
      // (function () {
      //   if (typeof name === 'undefined') {
      //     var name = 'jack';
      //     console.log('goodbye' + name);
      //   } else {
      //     console.log('hello' + name);
      //   }
      // })();
    </script>
  </body>
</html>
